<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<div class="top_nav2" id='top_nav'>
	<div align="center">
		<span>收货地址</span>
		<a class="guanbi"></a>
	</div>
</div>
<div class="min2">
	<div class="tc_login" style="margin-left: 80px;">
		<div class="right">
			<form method="post" name="form_add" id="form_add" target="_top">
				<div align="left" style="width: 580px; height: 18px; line-height: 18px; color: #C00;" id="msg"></div>
				<div align="left" style="width: 580px;">
					<label> 收 货 人 ：</label>
					<input type="text" name="name" id="name" style="width: 150px;" value="${address.name }"/>
					<label> 手机号：</label>
					<input type="text" name="mobPhone" id="mobPhone" style="width: 150px;" value="${address.mobPhone }" />
				</div>
				<div align="left" style="width: 580px; padding-top: 10px;">
					<label>所在地区：</label>
					<select class="dzselect" id="provinceId" onchange="loadCity()">
						<option value="0" selected="selected">请选择</option>
					</select>
					<input type="hidden" id="province" name="province" value="${address.province.id }" />
					<select class="dzselect" id="cityId" onchange="loadCounty()">
						<option value="0" selected="selected">请选择</option>
					</select>
					<input type="hidden" id="city" name="city" value="${address.city.id }" />
					<select class="dzselect" id="countyId" onchange="loadArea()">
						<option value="0" selected="selected">请选择</option>
					</select>
					<input type="hidden" id="county" name="county" value="${address.county.id }" />
				</div>
				<input type="hidden" id="area" name="area" value="${area}" />
				<input type="hidden" id="id" name="id" value="${address.id }" />
				<div align="left" style="width: 580px;">
					<label>详细地址：</label>
					<input type="text" name="address" id="address" style="width: 465px;" value="${address.address }" />
				</div>
				<div align="left" style="width: 580px;">
					<c:if test="${address==null||address.isDefault == '0' }">
						<input type="checkbox" style="width: 16px; height: 16px;" name="setdefault" id="setdefault"/>
					</c:if>
					<c:if test="${address.isDefault == '1' }">
						<input type="checkbox" style="width: 16px; height: 16px;" name="setdefault" id="setdefault" checked disabled/>
					</c:if>
					<label>设为默认地址</label>
				</div>
				<input type="hidden" id="isDefault" name="isDefault" value="${address.isDefault}" />
				<div align="center">
					<input type="button" class="button" onclick="update()" value="确定" />
				</div>
			</form>
		</div>
	</div>
</div>